Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Feat/exchange account schema #11

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

Conversation

dzdidi
Copy link
Contributor

@dzdidi dzdidi commented Mar 10, 2023

LNM slashfeed.json:

{
  "name": "LNMarkets",
  "description": "Up-to-date insight into your LNMarkets account performance",
  "type": "exchange_account_feed",
  "version": "0.0.1",
  "icons": {
    "200": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAIAAAAiOjnJAAASiklEQVR4nOydeXBVVZrA71uTvKxkJ4QkLwmQhEASSEJAkNCMqMjYLs3itDpVo7PUzJQ6NY7ltD2NSkVnxLHtGbpnaiirphS0RTYbghhAQETa7AtmXyD7npDt5a3pgmeHkLz3cr9zz/feTdf3+wvI++495P7eWb9zrjpn228EguCN0tMFIP40IbEIFEgsAgUSi0CBxCJQILEIFEgsAgUSi0CBxCJQILEIFEgsAgUSi0CBxCJQILEIFEgsAgUSi0CBxCJQILEIFEgsAgUSi0CBxCJQILEIFEgsAgUSi0CBxCJQILEIFEgsAgUSi0CBxCJQILEIFEgsAgUSi0CBxCJQILEIFEgsAgUSi0CBxCJQILEIFEgsAgUSi0CBxCJQILEIFEgsAgUSi0CBxCJQILEIFEgsAgUSi0CBxCJQILEIFEgsAgUSi0CBxCJQILEIFEgsAgUSi0CBxCJQILEIFEgsAgUSi0CBxCJQILEIFEgsAgUSi0CBxCJQILEIFEgsAgW1+28ZGTj4z9tPQqP25z/eO7IIFPLQ1mVb708U//mOrpH3//cqtGDOeOPVP9P5aEAhpZWdnxyr4FWAadJSFz+9M50tdv+Br3v7xhkCPSBWTmLtxhU1oJBbEz59I4HQG+14MHlt2hJQyJdf1dfU90FvNJe4mKBtW5ZBo1KTI46crLRap6QX4G5Jlga98/pDAf7eDLHDtwx9/SxWeaYpzE5ogIYUtyROAYvq7a1elRIJvdGzuzOgIQ7JyljKEBUU6AP9JrgmJFj3Xt4ONqsEQSip6JhildzdYikVtrX6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JBYBAokFoECiUWgQGIRKJBYBAokFoECiUWgQGIRKJBYBAokFoECiUWgQGIRKJBYBAokFoECiUWgQGIRKJBYBAokFoECiUWg8IcAAAD//5qTz8XMg5moAAAAAElFTkSuQmCC"
  },
  "fields": [
    {
      "type": "balance",
      "name": "total balance",
      "description": "Total balance",
      "main": "/feed/total-balance/",
      "units": "sats"
    },
    {
      "type": "pnl",
      "name": "total open pnl",
      "description": "Total open Profit and Loss",
      "main": "/feed/total-open-pnl/",
      "units": "sats"
    },
    {
      "type": "pnl_and_balance",
      "name": "total open pnl and total balance",
      "description": "Bitcoin open Profit and Loss and Total balance",
      "main": "/feed/total-open-pnl-and-total-balance/",
      "units": "sats"
    }
  ]
}

Seeded accounts:
slashfeed:citwzdpbmkgabmz9hscmap9cmjwkxt94m3coktb3e4obf4m6ecno#encryptionKey=ttium34uzwqkztg39t419bqgoaih5h4o3pwymyrd1f4qjdgoarmy
slashfeed:ic3o4is8mgkkg1er3n6otdz9ir9hj59t1ousm1nk6aiu9f3spzjy#encryptionKey=qyy9d8zurx5nqjqh4z7rb5ndihimmf84mzozsrmtpuf17kued73o
slashfeed:65i47yo7gfznee6wd8r7wybma6zz8bc7q5ssfint4t6t6hng87dy#encryptionKey=9qg1a3cthjf69e3regqqduyfs95fkuaq18ddtasq9ih5cdrb7qey

@dzdidi dzdidi marked this pull request as draft March 10, 2023 20:45
@dzdidi dzdidi force-pushed the feat/exchange-account-schema branch from 11e9dfc to c738264 Compare March 11, 2023 06:09
@dzdidi dzdidi marked this pull request as ready for review March 13, 2023 12:24
@Nuhvi
Copy link
Collaborator

Nuhvi commented Mar 14, 2023

@dzdidi can you explain what should denomination_type and denomination_ratio be used for?

Also, probably the third field will be removed at some point if John and Aldert agreed on the multi-field selections etc.

@dzdidi
Copy link
Contributor Author

dzdidi commented Mar 14, 2023

@nazeh there are two denomination_types: main and base and denomination_ratio specifies conversion ration frombase to main as a power of 10. For conversion between main and base denomination. For example converting balance in btc (main) to balance in sats (base) by balance_base = balance_main * 10 ^ denomination_ratio. It would probably have more sense for representation with base/main units.

Also, probably the third field will be removed at some point if John and Aldert agreed on the multi-field selections etc.

Understood. Lets wait for their feedback

@Nuhvi
Copy link
Collaborator

Nuhvi commented Mar 14, 2023

@dzdidi This is a bit complex to be honest. The data I will read from the main file, is in sats, I know that from the units, and I will show ${units} ${value}, what else should Bitkit care about here?

@BitcoinErrorLog
Copy link

Agree, we discussed this in chat yesterday; it is simpler to just feed the unit type ("sats" or "BTC") and number ("1000" or "0.00001000"

@dzdidi
Copy link
Contributor Author

dzdidi commented Mar 14, 2023

@nazeh , @BitcoinErrorLog agreed. Updated.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants